function V1Parser() {
	// override abstract class functions
	this.encodeUser = function(user) {
		var userObj = {};
		userObj.fbToken = user.fbToken;
		userObj.fbTokenExpiresOn = user.fbTokenExpiresOn.valueOf();
		userObj.fbID = user.fbID;
		userObj.email = user.email;
		userObj.username = user.username;
		userObj.firstName = user.firstName;
		userObj.lastName = user.lastName;
		userObj.timezone = user.timezone;
		userObj.roles = [];
		//encode roles
		for (role in user.roles)
		{
			userObj.roles.push( { name:role.name, keys:role.keys } );
		}
		return $.JSON.encode( userObj );
	}
	this.decodeUser = function( obj ) {
		return this.decodeUserLocalStorage( obj );
	}
	this.decodeFBProfile = function( obj ) {
		var user = new User();
		var fbObj = $.JSON.decode( obj );
		return fbObj;
	}
	this.decodeUserLocalStorage = function( obj ) {
		var user = new User();
		var userObj = $.JSON.decode( obj );
		user.fbToken = userObj.fbToken;
		user.fbTokenExpiresOn = new Date( userObj.fbTokenExpiresOn );
		user.fbID = userObj.fbID;
		user.email = userObj.email;
		user.username = userObj.username;
		user.firstName = userObj.firstName;
		user.lastName = userObj.lastName;
		user.timezone = userObj.timezone;
		for ( rolesObj in userObj.roles )
		{
			var role = new Role();
			role.name = rolesObj.name;
			role.keys = rolesObj.keys;
			user.roles.push( role );
		}
		return user;
	}
	this.encodeRole = function( role ){
		var roleObj = {};
		roleObj.name = role.name;
		roleObj.keys = role.keys;
		return $.JSON.encode( roleObj );
	}
	this.decodeRole = function( role ){
		var roleObj = $.JSON.decode( role );
		var role = new Role();
		role.name = roleObj.name;
		role.keys = roleObj.keys;
		return role;
	}
	this.decodeError = function( error ){
		if( error.substring(0,1) == '{' ){
			error = $.JSON.decode( error );
		}
		return error;
	}
	this.encodeDomain = function( domain ){
		var domainObj = {};
		domainObj.name = domain.name;
		return $.JSON.encode( domainObj );
	}
	this.decodeDomain = function( domain ){
		var domainObj = $.JSON.decode( domain );
		var domain = new Domain();
		domain.name = domainObj.name;
		return domain;
	}
}
// implement DAO interface
V1Parser.prototype = new Parser();
